home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / JAVA Utilities / JProxy 1.1.0 / README.TXT < prev    next >
Encoding:
Text File  |  2003-04-29  |  4.9 KB  |  168 lines

  1. JProxy 1.1.0
  2.  
  3. The download includes:
  4.  
  5. proxy.ear - J2EE Application. It contains:
  6.   proxyservlet.war - servlet-based JProxy Server
  7.   samples.jar - Stateful Session Test Bean and Client Application
  8.  
  9. proxyclient.jar - client-side JProxy
  10.  
  11. testclient.jar - Client Application for Stateful Session Test Bean
  12.  
  13. docs - JProxy documentation
  14.   JProxy API
  15.   JProxy help html-files
  16.  
  17.  
  18. examples - source code of JProxy examples:
  19.   samples - Stateful Session Test Bean and Client Application
  20.   mail - EJB-based Mailing-list
  21.   clock - JMS-based clock
  22.   messanger - JMS-based chat-applet 
  23.  
  24.  
  25. samples.jar may be used as test of JProxy. 
  26. Try the test first. 
  27.  
  28. The file contains following JProxy examples: 
  29.  
  30. 1. Statefull Session Bean example. 
  31. 2. RMI Example
  32.  
  33. For simplicity reason samples.jar may be used for both client and server. 
  34. It contains source code and classes.
  35.  
  36. You may simply unzip samples.jar. 
  37.  
  38. It contains both Test EJB and Client Application. 
  39. EJB Test Server side samples.jar is included in proxy.ear. 
  40.  
  41. It also includes source code and classes for EJB and client. 
  42. You may simply unzip samples.jar. 
  43.  
  44. Before trying example place proxy.ear in deployment directory of your Application Server. 
  45. For JBoss it is jboss/deploy and for Orion it is orion/applications. 
  46.  
  47. To execute client type from command prompt: 
  48.  
  49.  
  50. -------- EJB Test WITH JProxy ---------
  51. UNIX
  52. test.sh -Djava.naming.provider.url=Protocol://your_server_name:port
  53.  
  54. NT
  55. test.bat -Djava.naming.provider.url=Protocol://your_server_name:port
  56.  
  57.  
  58. Where: 
  59. Protocol - "http" or "https". Default is "http"
  60.  
  61. YuorServerName - name of the host where your EJB Server is running. 
  62. If it is local then just use "localhost". 
  63. Default is "localhost".
  64.  
  65. Port - port of your Web Server (Servlet Engine) where JProxy deployed. 
  66. Default is 80.
  67.  
  68.  
  69. -------- EJB Test WITOUT JProxy on JBoss ---------
  70. UNIX
  71. Open test.sh. Read instructions. 
  72. test.sh -Djava.naming.provider.url=your_server_name
  73.  
  74. NT
  75. Open test.sh. See instructions
  76. java -Djava.naming.factory.initial=com.jproxy.proxy.NamingContextFactory -Djava.naming.provider.url=your_server_name -cp samples.jar;proxyclient.jar;j2api.jar com.jproxy.samples.ejb.test.SessionClient
  77. test.bat -Djava.naming.provider.url=your_server_name
  78.  
  79. YuorServerName - name of the host where your EJB Server is running. 
  80. If it is local then just use "localhost". 
  81. Default is "localhost".
  82.  
  83. Port - RMI registry port is 1099
  84.  
  85.  
  86.  
  87. -------- RMI Test ---------
  88. UNIX
  89. To start Server:
  90. test_rmi_server.sh -Djava.naming.provider.url=Protocol://your_server_name:port
  91.  
  92. To execute client:
  93. test_rmi_client.sh -Djava.naming.provider.url=Protocol://your_server_name:port
  94.  
  95. NT
  96. To start Server:
  97. test_rmi_server.bat -Djava.naming.provider.url=Protocol://your_server_name:port
  98.  
  99. To execute client:
  100. test_rmi_client.bat -Djava.naming.provider.url=Protocol://your_server_name:port
  101.  
  102.  
  103. For more details see readme.txt in samples.jar
  104.  
  105. You may also check JProxy from Web Browser from URL:
  106. http://your_server_name:port/proxyservlet/test.jsp
  107.  
  108. The EJB implementation returns server local time to the client. 
  109. Last line will look like: 
  110. >>>Server Time: Tue Feb 12 10:08:21 EST 2002
  111.  
  112. Debug information will be printed during the test. 
  113. To disable output of debuging information you have to modify proxy.properties "com.jproxy.proxy.log.level". 
  114. You my set it to "NONE" to completly disable output to stdout. 
  115. See configuration.html for more information. 
  116.  
  117. If your client is local and uses http protocol with default port (80) 
  118. then you do not need to specyfy server URL
  119.  
  120. To use "https" protocol you have to enable SSL on your server. 
  121.  
  122. If you  get folowing exception:
  123.  
  124. java.io.FileNotFoundException: http://localhost/proxyservlet/servlet/proxyservlet
  125.  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
  126.  
  127. ...then you did not specify server URL properly. Be sure that port number is correct. 
  128.  
  129.  
  130.  
  131.  
  132.  
  133. -------- JProxy Performance Test --------------
  134. usage: java -cp samples.jar;proxyclient.jar:j2api.jar [-Djava.properties]
  135.  com.jproxy.samples.ejb.test.PerformanceClient
  136.  [ [http://|https://]YourServerName:[port] [#_of_loops] [#_of_bytes] [#_of_threads] ]
  137.  
  138. where:
  139.  #_of_loops - number of loops. Default 1"+
  140.  #_of_bytes - number of bytes send(received) to host in request. Default 0"+
  141.  #_of_threads - number of threads. Default 1"+
  142.  
  143. UNIX
  144. test_performance.sh -Djava.naming.provider.url=Protocol://your_server_name:port
  145.  
  146. NT
  147. test_performance.bat -Djava.naming.provider.url=Protocol://your_server_name:port
  148.  
  149.  
  150. Where: 
  151. Protocol - "http" or "https". Default is "http"
  152.  
  153. YuorServerName - name of the host where your EJB Server is running. 
  154. If it is local then just use "localhost". 
  155. Default is "localhost".
  156.  
  157. Port - port of your Web Server (Servlet Engine) where JProxy deployed. 
  158. Default is 80.
  159.  
  160.  
  161.  
  162.  
  163. The sample bean and client have been successfully tested on JBoss, Orion WebLogic and JONAS Application Servers. 
  164.  
  165.  
  166.  
  167. [JProxy LLC]
  168.